-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scala.js support in macroUtils, tagged and opaque #259
Conversation
Slick is not available in Scala.js. So pl.iterators.kebs.tagged.slick is only available on the JVM. And the related tests are only running on the JVM.
@@ -16,7 +16,7 @@ lazy val baseSettings = Seq( | |||
organizationName := "Iterators", | |||
organizationHomepage := Some(url("https://iterato.rs")), | |||
homepage := Some(url("https://github.com/theiterators/kebs")), | |||
scalacOptions := Seq("-deprecation", "-unchecked", "-feature", "-encoding", "utf8") | |||
scalacOptions ++= Seq("-deprecation", "-unchecked", "-feature", "-encoding", "utf8") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sbt-scalajs
plugin also adds some scalacOptions
.
@@ -104,20 +104,19 @@ def paradisePlugin(scalaVersion: String): Seq[ModuleID] = | |||
else | |||
Seq.empty | |||
|
|||
val scalaTest = "org.scalatest" %% "scalatest" % "3.2.14" | |||
val scalaCheck = "org.scalacheck" %% "scalacheck" % "1.17.0" | |||
val scalaTest = Def.setting("org.scalatest" %%% "scalatest" % "3.2.14") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The %%%
needs to acces the Scala.js settings, so we need to enclose that in a setting too.
if (!isScalaJS) { | ||
property("string should not be equivalent to other reference of same string") = forAll { (stringValue: String) => | ||
!areEquiv(stringValue, new String(stringValue)) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Scala.js specifiaction is different from the JVM one here. So the test would fail if we run it on Scala.js. Same for the two other tests below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR adds Scala.js support in macroUitls
, tagged
and opaque
.
Slick is not available on Scala.js so there is no SlickSupport
in tagged
on Scala.js. As a consequece there is no tests on tagged
for Scala.js.
I was not able to cross compile other projects with Scala.js because of the dependency to instances
which uses Java time and Currency
from the JDK. Those are not implemented in the JDK implementation of Scala.js. For Java time we could use cquiroz/scala-java-time.
@adpi2 thank you for the PR! 🙏 |
No description provided.